//
//  DHUser_HomePage_Follow_ItemCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/6/18.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "DHUser_HomePage_Follow_ItemCell.h"

@implementation DHUser_HomePage_Follow_ItemCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.headerImageView.layer.cornerRadius = self.headerImageView.height / 2;
    self.followView.layer.cornerRadius = self.followView.height / 2;
    self.followView.layer.borderWidth = 1;
    self.followView.layer.borderColor = [[UIColor colorWithHexString:@"#9A9A9A"] CGColor];
}

- (void)updateCell:(NSDictionary *)dic{
    self.nameLabel.text = [dic objectForKey:@"nickname"];
    self.titleLabel.text = [dic objectForKey:@"title"];
    [self.headerImageView dh_setImageURLString:[dic objectForKey:@"photo"]];
    
    if ([[dic objectForKey:@"each"] boolValue]) {
        [self.followLabel setText:@"已关注"];
        [self.followImgView setImage:[UIImage imageNamed:@"followed"]];
    }else{
        self.followLabel.text = @"关注";
        [self.followImgView setImage:[UIImage imageNamed:@"follow"]];
    }
}

- (IBAction)followAction:(id)sender {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
